package com.sh.流和file等;

import java.util.Objects;

public class apple {
    private String name;
    private int price;


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        apple apple = (apple) o;
        return price == apple.price && Objects.equals(name, apple.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, price);
    }
}
